<h1>Recent Articles  In <?php echo $this->cate->cat_title;?> </h1>
<h2>

</h2>
<ul class="post-list">
<?php if ($this->data) foreach ($this->data as $post) {
	print "<li >";
	preg_match_all('/<img [^>]*src=["|\']([^"|\']+)/i', $post['content'], $matches);
	foreach ($matches[1] as $key=>$value) {
		echo "<div class=\"img-outer\"><img src=\"$value\"/></div>";
		break;
	}
	print "<a href=\"".
	$this->url(array('controller'=>'post','action' => 'view', 'id' => $post['id']), 'post', true)
	."\">{$post['title']}</a>";
	
	
	if ($this->hasIdentity) {
		echo " <a href=\"".
			$this->baseUrl().'admin/post/edit/'.$post['id']
			."\" class=\"ico-edit\"></a>";
	}

	
	if (preg_match('/^.{1,220}\b/s', strip_tags($post['content']), $match))
	{
		$line=$match[0];
	}
	
	echo "<p>$line</p><div class=\"clear\"></div></li>";
} ?>
</ul>
<?php 
       echo $this->paginationControl($this->data, 'Sliding' , 'pagination.phtml'); 
?>